<?php
require_once(dirname(__FILE__)."/../include/db_mysql.php");

function create_one_facility( )
{
	$sql = new SqlClass;
	//连接数据库
	$sql->connect();
	//执行sql语句

	//向facility表中插入一条记录
	$sql_command = "INSERT INTO  `facility`.`facility` (
				countryId ,
				province_municipalities_Id,
				cityId,
				district_county_Id,
				street_doorNumber
				)
				VALUES (
				-999, -999, -999, -999, '-999'
				);";
    $r = $sql->exec_sql( $sql_command );//保存执行sql的结果

	$facilityId = mysql_insert_id();//得到刚才插入到facility表中的记录Id。

	if( $facilityId == 0 ) //说明facilityId出错
	{
		$sql->close();
		return '';
	}

	$sql->close();
	return $facilityId;
}
?>